<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="../common/taglibs.jsp"%>

<%@include file="RolePowerManager.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<link rel="stylesheet" href="${ctx}/css/common.css" type="text/css"></link>
		<link rel="stylesheet" href="${ctx}/css/reset.css" type="text/css"></link>
		
 		
	  <script type="text/javascript" src="${ctx }/js/jquery-1.7.2.js"></script>
 		<script type="text/javascript" src="${ctx}/js/jquery.easydrag.handler.beta2.js"></script>
  		<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/EmpManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/DutyManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/EducationManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/EduDegreeManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/SkillGradeManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/EmpStatusManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/DeptDAOImpl.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/lgqEmpManager.js'></script>
		
		<script type='text/javascript' src='${ctx}/dwr/engine.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/util.js'></script>
		<script type="text/javascript" src="${ctx }/js/Dossier/lgqemp.js"> </script>
	</head>
	<body onload="getEdu()">
		<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
			<TR height=28>
				<TD background=../images/title_bg1.jpg style="FONT-SIZE: 12px;">
					当前位置:人员档案管理 >> 人员信息查询
				</TD>
			</TR>
			<TR>
				<TD bgColor=#b1ceef height=1></TD>
			</TR>
			<TR height=20>
				<TD background=../images/shadow_bg.jpg></TD>
			</TR>
		</TABLE>
		<form id="searchform" action="GetAllEmp" method="post">
		<div class="query">
			<div class="querytype">
				<label>
					查询条件：
				</label>
				姓名：<input type="text" size="6" name="name">
				年龄:<input type="text" size="5" name="age">
				性别：<select name="sex" id="sex">
				<option value="1">男</option>
				<option value="0">女</option>
				</select>
				文化水平：<select name="edu" id="edu"></select>
			</div>
			技术等级：<select name="skill" id="skill"></select>
			<span class="STYLE1"><img src="${ctx}/images/a1.gif" width="9"
							height="9" /> </span>
					<span class="STYLE1"> </span ><a style="cursor: pointer;" onclick="search2()">查询</a><span
						class="STYLE1"></span>
			</div>
			</form>

			
			<div class="clear"></div>
		</div>
		<div class="bottom"></div>
		<div id="main">
			<table id="detail_t">
				<tr>
					<th>序号</th>
					<th>员工编号</th>
					<th>员工姓名</th>
					<th>身份证号</th>
					<th>学历</th>
					<th>部门</th>
					<th>职务</th>
					<th>生日</th>
					<th>人员状态</th>
					<th>技术等级</th>
					<th>职称</th>
					<th>更多操作</th>
				</tr>
				
				<c:forEach items="${page.list}" var="t" varStatus="status">
					<tr>
						<td>${status.count }</td>
						<td id="t_en">${t.empno}</td>
						<td id="t_na"><a  onclick="popphoto('${t.empno}')" style="cursor: pointer;">${t.name}</a></td>
						<td id="t_na"><a  onclick="popidcard('${t.idCardid}')" style="cursor: pointer;">${t.idCardid}</a></td>
						<td id="t_ec"><a  onclick="popedu('${t.educationimg}')" style="cursor: pointer;">${t.education.name}</a></td>
						<td id="t_de">${t.dept.name}</td>
						<td id="t_du">${t.duty.name}</td>
						<td id="t_t">${t.birthday }</td>
						<td id="t_es">${t.empStatus.name}</td>
						<td id="t_sg">${t.skillGrade.name}</td>
						<td id="t_jt">${t.jobTitle.name}</td>						
						<td height="18" bgcolor="#FFFFFF">
							<div align="center">
								<span class="STYLE1"><img src="${ctx}/images/037.gif"
										width="9" height="9" /> </span>
								<span class="STYLE1"> [</span><a style="cursor: pointer;" href="#" onclick="clickEditEmp('${t.id}')">详情/编辑</a><span class="STYLE1">]</span>
								&nbsp;&nbsp;&nbsp;
								<span class="STYLE2"><img src="../images/010.gif"
										width="9" height="9" /> </span>
								<span class="STYLE2"> </span><span class="STYLE1">[</span><a
									href="javascript:void(0)" onclick="javaScript:deleteEmp('${t.id})">删除</a><span
									class="STYLE1">]</span>
	
							</div>
						</td>
					</tr>
				</c:forEach>

			</table>
			<div class="manu">
				共
				<font color="#ff6600">${page.pageCount}</font>条记录当前第
				<font color="#ff6600">${page.pageNo}/${page.pageCount}</font>页
				<a href="GetAllEmp?pageNo=${1}">首页</a>
				<a href="GetAllEmp?pageNo=${page.pageNo-1}">上一页</a>
				<a href="GetAllEmp?pageNo=${page.pageNo+1}">下一页</a>
				<a href="GetAllEmp?pageNo=${page.pageCount}">末页
				</a>每页显示
				  <input type="text" name="pageSize"  id="pageSize" size="4"/>条
				  <input type="submit" value="提交" class="submitbuttton" onclick="changePageSize()"/> 
			</div>
		</div>
		<form id="empform" action="UpdateEmpServlet" method="post" >
			<div id="add_div" class="pop_box" style="background: white;border: 1px solid #CAD9EA;box-shadow:0 0 10px #06C;">			
			<div class="p_head" id="add_head">
				<span class="p_h_title">添加新员工</span>
				<span><a class="p_h_close" onclick="hideaddDiv()"title="close">X</a> </span>
				</div>
				<div class="p_box_body" id="p_b_body" style="background: white">
					<table id="p_con_t">
						<tr>
							<td class="t1">
								员工编号：<input type="hidden" name="empid" id="empid"/>
							</td>
							<td>
								<span id="empno"></span>
							</td>
						</tr>
						<tr>
							<td class="t1">
								员工姓名：
							</td>
							<td>
								<input id="emp_name" name="emp_name" type="text" />
							</td>
						</tr>
						
						<tr>
							<td class="t1">
								性别：
							</td>
							<td>
						
								<select id="sex_edit" name="sex_type" >
								<option value="T">男</option>
								<option value="F">女</option>
								</select>
								
							</td>
						</tr>
						
						<tr>
							<td class="t1">
								学历：
							</td><td>
							<select name="educationtype" id="educationtype">
				    			<option value=""></option>
				    		</select></td>
						</tr>
						<tr>
							<td class="t1">
								学位：
							</td>
							<td>
							<select name="eduDegreetype" id="eduDegreetype">
				    			<option value=""></option>
				    		</select>
				    		</td>
						</tr>
						<tr>
				   	 	<td>部门：</td>
				    		<td>
				    		<select name="depttype" id="depttype">
				    			<option value=""></option>
				    		</select>
				    		</td>
				    	</tr>
						<tr>
							<td>
								职位：
							</td>
							<td>
				    		<select name="dutytype" id="dutytype">
				    			<option value=""></option>
				    		</select>
				    		</td>
						<tr>
							<td class="t1">
								技术等级：
							</td>
							<td>
				    		<select name="skilltype" id="skilltype">
				    			<option value=""></option>
				    		</select>
				    		</td>
						</tr>
						<tr>
							<td class="t1">
								工资：
							</td>
							<td>
								<input id="salary_edit" name="salary" type="text" />
							</td>
						</tr>
						<tr>
							<td class="t1">
								人员状态：
							</td>
							<td>
				    		<span id="empstatustype"></span>
				    		</td>
						</tr>
						<tr>
							<td class="t1">
								家庭地址：
							</td>
							<td>
								<input id="address_edit" name="address" type="text" />
							</td>
						</tr>
						<tr>
							<td class="t1">
								电话：
							</td>
							<td>
								<input id="phone_edit" name="phone" type="text" />
							</td>
						</tr>
						<tr>
							<td class="t1">
								身份证：
							</td>
							<td>
								<input id="cid" name="cid" type="text" />
							</td>
						</tr>
						
						<tr>
							<td></td>
							<td>
								<input type="submit" value="提交"  />
							</td>
						</tr>
						</table>
				</div>
				</div>
			
		</form>
	</body>
	
			<div id="poppicture_div" class="pop_box" style="background: white;border: 1px solid #CAD9EA;box-shadow:0 0 10px #06C;">			
			<div class="p_head" id="poppicture_head">
				<span class="p_h_title">图片查看</span>
				<span><a class="p_h_close" onclick="hideapictureDiv()"title="close">X</a> </span>
				</div>
				<div class="p_box_body" id="p_b_body" style="background: white">
				<center>
				<img id="picture" alt="picture" src="">
				</center>
				</div>
				</div>
</html>